package nrpc.util;

import java.lang.reflect.Method;

import nrpc.annotation.Asynchronized;

public class AsynMethodTool {
	
	public static boolean isAsyn(Method method) {
		return method.isAnnotationPresent(Asynchronized.class);
	}
	
	public static boolean isCallback(Method method) {
		return method.getAnnotationsByType(Asynchronized.class)[0].callback();
	}
	
	public static boolean isSubscribe(Method method){
		return method.getAnnotationsByType(Asynchronized.class)[0].subscribe();
	}
	
}
